/******************************************************************************
* @file     report_port.h
* @brief    报告管理外部移植接口声明
* @version  1.0
* @date     2016-08-11
* @author   roger.luo
* 
* Copyright(C) 2016
* All rights reserved.
*
*******************************************************************************/

#ifndef _REPORT_PORT_H_
#define _REPORT_PORT_H_

/*报告缓冲区管理接口声明 -----------------------------------------------------*/
typedef struct 
{
	int (*write)(unsigned int addr, void *buf, unsigned int len);   /*flash 读*/
	int (*read) (unsigned int addr, void *buf, unsigned int len);   /*flash 写*/
	int (*erase)(unsigned int addr);                                /*扇区擦除*/
    unsigned short (*crc16)(void *buf, unsigned int len);           /*crc16校验接口*/
    void *(*malloc)(unsigned int nbytes);                           /*内存分配*/
    void (*free)(void *p);                                          /*内存释放*/    
}report_port_t;

/*报告缓冲区管理接口定义 -----------------------------------------------------*/
extern const report_port_t report_port;

#endif
